using System;
using System.Collections.Generic;

namespace SAP.BusinessOne.Mackinac.Generator.Model
{
    public class Clazz
    {
        public Clazz(Type target, Type contract)
        {
            Name = target.Name;
            FullName = target.FullName;
            TechnicalName = Name.ToUpper();

            NS = new Namespace(target);

            Methods = new List<Method>();
            foreach (var mi in contract.GetMethods())
            {
                Methods.Add(new Method(mi));
            }
        }

        public string Name { get; private set; }
        public string FullName { get; private set; }
        public string TechnicalName { get; private set; }
        public IList<Method> Methods { get; private set; }
        public Namespace NS { get; private set; }
    }
}